<? if($this->lang->lang() == 'ru'): ?>
        <style>
            .accomodation-list .car-box dl dt {
                width: 58%;
            }
            dt,dd{
                font-size: 11px !important
            }
        </style>
    <? endif; ?>

<div id="excursions-placeholder">
    <div id="wrap" class="clearfix">

        <div id="aside">

            <div id="changeDetasilsBox">
                <? $this->load->view('excursions/parts/your_details') ?>
            </div>
            <div id="serchModule">
                <? $this->load->view('excursions/parts/search_box') ?>
            </div>
			<? $this->load->view('destinations/parts/banner') ?>
            <? $this->load->view('rentacar/parts/map_box') ?>

        </div>
        <!-- / Aside -->

        <div id="main">

            <? $total_res=count($excursions); ?>
            <div class="title title-search no-line">
                <p class="float-left"><?= lang('search.found') ?> <?= $total_res ?> <?= lang('search.results') ?><? if($this->lang->lang() == 'en' && $total_res > 1) echo's'; ?></p>				
                <h1><?= isset($_POST['freetext']) && trim($_POST['freetext']) != '' ? lang('search.search.results') : lang('search.search.results.clean') ?></h1>
            </div>

            <form action="<?=base_url('excursions/search')?>" id="submit_search" method="post" style="display: none">

                <?
                    $week_days=lang('week_days');
                ?>

                <input type="text" value="<? if(isset($_POST['freetext'])) echo $_POST['freetext']; ?>" name="freetext" id="freetext">
                <ul>

                    <li> <input type="checkbox" name="monday"    <? if(isset($_POST['monday'])) echo 'checked="checked"'; ?>> <small><?= $week_days[0]; ?></small> </li>
                    <li> <input type="checkbox" name="tuesday"   <? if(isset($_POST['tuesday'])) echo 'checked="checked"'; ?>> <small><?= $week_days[1]; ?></small> </li>
                    <li> <input type="checkbox" name="wednesday" <? if(isset($_POST['wednesday'])) echo 'checked="checked"'; ?>> <small><?= $week_days[2]; ?></small> </li>
                    <li> <input type="checkbox" name="thursday"  <? if(isset($_POST['thursday'])) echo 'checked="checked"'; ?>> <small><?= $week_days[3]; ?></small> </li>
                    <li> <input type="checkbox" name="friday"    <? if(isset($_POST['friday'])) echo 'checked="checked"'; ?>> <small><?= $week_days[4]; ?></small> </li>
                    <li> <input type="checkbox" name="saturday"  <? if(isset($_POST['saturday'])) echo 'checked="checked"'; ?>> <small><?= $week_days[5]; ?></small> </li>
                    <li> <input type="checkbox" name="sunday"    <? if(isset($_POST['sunday'])) echo 'checked="checked"'; ?>> <small><?= $week_days[6]; ?></small> </li>
                </ul>
                <ul class="side-form">
                    <li>
                        <label><?= lang('adults') ?></label>
                        <select class="dropdownized" name="adults" id="adults">
                            <? if(!isset($_POST['adults'])) $first_select='selected="selected"'; ?>
                            <option value="1" <? if(isset($_POST['adults']) && $_POST['adults'] == 1) echo 'selected="selected"'; ?>>1</option>
                            <option value="2" <? if(isset($_POST['adults']) && $_POST['adults'] == 2) echo 'selected="selected"'; if(isset($first_select)) echo $first_select; ?>>2</option>
                            <option value="3" <? if(isset($_POST['adults']) && $_POST['adults'] == 3) echo 'selected="selected"'; ?>>3</option>
                            <option value="4" <? if(isset($_POST['adults']) && $_POST['adults'] == 4) echo 'selected="selected"'; ?>>4</option>
                            <option value="5" <? if(isset($_POST['adults']) && $_POST['adults'] == 5) echo 'selected="selected"'; ?>>5</option>
                            <option value="6" <? if(isset($_POST['adults']) && $_POST['adults'] == 6) echo 'selected="selected"'; ?>>6</option>
                            <option value="7" <? if(isset($_POST['adults']) && $_POST['adults'] == 7) echo 'selected="selected"'; ?>>7</option>
                            <option value="8" <? if(isset($_POST['adults']) && $_POST['adults'] == 8) echo 'selected="selected"'; ?>>8</option>
                            <option value="9" <? if(isset($_POST['adults']) && $_POST['adults'] == 9) echo 'selected="selected"'; ?>>9</option>

                        </select>
                    </li>
                    <li>
                        <label><?= lang('children') ?></label>
                        <select class="dropdownized" name="children" id="children">
                            <option value="0" <? if(isset($_POST['children']) && $_POST['children'] == 0) echo 'selected="selected"'; ?>>0</option>
                            <option value="1" <? if(isset($_POST['children']) && $_POST['children'] == 1) echo 'selected="selected"'; ?>>1</option>
                            <option value="2" <? if(isset($_POST['children']) && $_POST['children'] == 2) echo 'selected="selected"'; ?>>2</option>
                            <option value="3" <? if(isset($_POST['children']) && $_POST['children'] == 3) echo 'selected="selected"'; ?>>3</option>
                            <option value="4" <? if(isset($_POST['children']) && $_POST['children'] == 4) echo 'selected="selected"'; ?>>4</option>
                            <option value="5" <? if(isset($_POST['children']) && $_POST['children'] == 5) echo 'selected="selected"'; ?>>5</option>
                            <option value="6" <? if(isset($_POST['children']) && $_POST['children'] == 6) echo 'selected="selected"'; ?>>6</option>
                            <option value="7" <? if(isset($_POST['children']) && $_POST['children'] == 7) echo 'selected="selected"'; ?>>7</option>
                            <option value="8" <? if(isset($_POST['children']) && $_POST['children'] == 8) echo 'selected="selected"'; ?>>8</option>
                            <option value="9" <? if(isset($_POST['children']) && $_POST['children'] == 9) echo 'selected="selected"'; ?>>9</option>

                        </select>
                    </li>
                </ul>
            </form>

            <div class="search-list accomodation-list clearfix">

                <?
                    $i=1;
                    if($excursions)
                        foreach($excursions as $excursion):
                            //$this->firephp->log($excursion);
                            ?>



                            <div class="car-box">
                                <?
                                $href=base_url('excursions/'.urlify::filter($excursion->title).'-'.$excursion->id);
                                ?>

                                <? $filename=get_thumbnail(200, 150, $excursion->f_name) ?>
                                <a href="<?= $href ?>" class="submit_search"> <img src="<?= $hosting ?>pro-gallery/<?= $excursion->g_path.'/'.$filename ?>" alt="" width="132"> </a>

                                <div class="details">
                                    <div class="star-rating-box">

                                        <? //$this->load->view('excursions/parts/rating',array('no'=>$i,'score'=>round($excursion->score/2)));  ?>

                                    </div>

                                        <?
											$pices = explode(" ",$excursion->title);
										?>
										<h2><a href="<?=$href?>"><span><?=$pices[0]?></span><?
														for($j=1;$j<=count($pices)-1;$j++){
															echo ' '.$pices[$j];
                                        }
												?></a></h2>

                                    <p><?= clean_html($excursion->description) ?></p>

                                    <dl>
                                        <dt><?= lang('start_day') ?>:</dt>
                                        <dd><?
                            echo tranlate_days(lang('short_week_days'), $excursion->startWeekDay).' ';
                                        ?></dd>
                                        <dt><?= lang('duration') ?>:</dt>
                                        <dd>1 <?= lang('day') ?></dd>
                                        <dt><?= lang('guides') ?>:</dt>
                                        <dd><?= clean_html($excursion->guides) ?></dd>
                                    </dl>

                                    <span class='big'><?= $excursion->adultPrice; ?>€ <span>/ <?= lang('person') ?></span></span>
                                    <a href="<?= $href ?>" class="button submit_search"><?= lang('shared.book.now') ?> &raquo;</a>
                                </div>
                            </div> <!--/ Item -->

                            <? $i++;
                        endforeach;
                ?>

            </div>
            <!-- / Three Columns -->

            <div class="two-columns clearfix">
<? $this->load->view('parts/two_column') ?>
            </div>

        </div>
        <!-- / Mian -->

    </div>
    <!-- / Wrap -->
</div>